//---------------------------------------------------------------------
// <copyright file="CsdlReferentialConstraint.cs" company="Microsoft">
//      Copyright (c) Microsoft Corporation.  All rights reserved.
// </copyright>
//---------------------------------------------------------------------

namespace Microsoft.Data.Edm.Csdl.Internal.Parsing.Ast
{
    /// <summary>
    /// Represents a CSDL referential constraint.
    /// </summary>
    internal class CsdlReferentialConstraint : CsdlElementWithDocumentation
    {
        private readonly CsdlReferentialConstraintRole principal;
        private readonly CsdlReferentialConstraintRole dependent;

        public CsdlReferentialConstraint(CsdlReferentialConstraintRole principal, CsdlReferentialConstraintRole dependent, CsdlDocumentation documentation, CsdlLocation location)
            : base(documentation, location)
        {
            this.principal = principal;
            this.dependent = dependent;
        }

        public CsdlReferentialConstraintRole Principal
        {
            get { return this.principal; }
        }

        public CsdlReferentialConstraintRole Dependent
        {
            get { return this.dependent; }
        }
    }
}
